package com.example.fish.controller;

import com.example.fish.service.little.LittleService;
import com.example.fish.utils.JsonResult;
import com.example.fish.vo.AuthorInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/little")
public class LittleController extends BaseController{
    @Autowired
    private LittleService littleService;

    @PostMapping("/author")
    private JsonResult<AuthorInfo> author(Integer userid){
        AuthorInfo authorInfo = littleService.getAuthorInfo(userid);
        return new JsonResult<>(200,"success",authorInfo);
    }
}
